<!--
 * @Author       : wfl
 * @LastEditors: ww
 * @description  :
 * @updateInfo   :
 * @Date         : 2023-03-22 12:27:56
 * @LastEditTime: 2023-06-27 17:13:44
-->
<script setup lang="ts" name="ApproveConfig">
import { ikMitt } from 'iking-utils'
import '@/assets/styles/approve-center.scss'
import FormConfig from './FormConfig/index.vue'
import ApproveHandover from './Tabs/ApproveHandover/index.vue'

const tabs = [
  { id: 'formConfig', label: '表单管理' },
  { id: 'approve', label: '审批交接', disabled: true }
]

const activeTab = ref(tabs[0].id)
const activeHome = ref(true)

ikMitt.on('approveHome', (isHome: boolean) => {
  activeHome.value = isHome
})
</script>

<template>
  <IkPageTabs
    v-model="activeTab"
    split
    lazy-tab
    :tabs="tabs"
  >
    <template #formConfig>
      <!-- 外层包DIV是为了自适应页面高度 -->
      <div>
        <FormConfig />
      </div>
    </template>
    <template #approve>
      <div>
        <ApproveHandover />
      </div>
    </template>
  </IkPageTabs>
</template>
